Skip to content

[Feat] 세모피드 조회 응답값 추가 및 세모피드 이모지 추가 및 감소 기능 추가#140

Merged
pooreumjung merged 8 commits into
developfrom
feat/#139-semofeed-emoji-reactions
May 28, 2026
Merged

[Feat] 세모피드 조회 응답값 추가 및 세모피드 이모지 추가 및 감소 기능 추가#140
pooreumjung merged 8 commits into
developfrom
feat/#139-semofeed-emoji-reactions

Conversation

@pooreumjung

Copy link
Copy Markdown
Member

🧾 요약

  • 세모피드 이모지 반응 기능을 추가하고, 세모피드 목록 응답에 작성자 정보와 이모지 상태를 포함

🔗 이슈

✨ 변경 내용

  • 세모피드 이모지 테이블 및 타입 추가: FIRE, HEART, CONGRATS, LAUGH
  • POST /api/semofeed/{semoFeedId}/emojis 이모지 토글 API 추가
  • GET /api/semofeed 응답에 작성자 userId, profileUrl, nickname 추가
  • GET /api/semofeed 응답에 emojiCounts, reactedByMe, mine 추가
  • 피드 목록 조회 시 이모지 집계/내 반응 조회를 배치 쿼리로 처리해 N+1 방지
  • 세모피드 생성 응답에서도 이모지 필드 기본값을 일관되게 반환하도록 수정
  • 세모피드 이모지 반응 및 응답 조립 테스트 추가

✅ 확인

  • 빌드 OK
  • 테스트 OK

@pooreumjung pooreumjung self-assigned this May 28, 2026
@pooreumjung pooreumjung added the enhancement New feature or request label May 28, 2026
@coderabbitai

coderabbitai Bot commented May 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a9286616-fa22-45ff-ae93-c9b22f98cbc0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/#139-semofeed-emoji-reactions

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이번 변경은 세모피드에 사용자가 이모지로 반응할 수 있는 기능을 추가하고, 피드 목록 조회 시 필요한 부가 정보를 응답값에 포함하여 사용자 경험을 개선하는 데 목적이 있습니다. 또한, 데이터 조회 시 발생할 수 있는 성능 이슈를 사전에 방지하기 위해 배치 쿼리를 도입하였습니다.

Highlights

  • 이모지 반응 기능 추가: 세모피드에 FIRE, HEART, CONGRATS, LAUGH 이모지를 추가하고 취소할 수 있는 토글 API를 구현했습니다.
  • 응답 데이터 확장: 세모피드 목록 조회 응답에 작성자 정보(userId, profileUrl, nickname)와 이모지 상태(emojiCounts, reactedByMe, mine)를 포함하도록 개선했습니다.
  • 성능 최적화: 피드 목록 조회 시 이모지 집계 및 사용자 반응 여부를 배치 쿼리로 처리하여 N+1 문제를 방지했습니다.
New Features

🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

이번 풀이 리퀘스트는 세모피드에 이모지 반응(FIRE, HEART, CONGRATS, LAUGH)을 추가하고 토글할 수 있는 기능을 구현하였습니다. 이를 위해 SemoFeedEmoji 엔티티, 관련 레포지토리, 서비스 레이어 및 API 엔드포인트를 새롭게 추가하고, 기존 피드 목록 조회 시 이모지 개수와 본인의 반응 여부를 함께 반환하도록 DTO와 조회 로직을 개선하였습니다. 리뷰어는 SemoFeedEmojiService에서 동시성 예외(DataIntegrityViolationException)를 try-catch로 처리할 때 JPA의 지연 쓰기 및 트랜잭션 롤백 마킹 메커니즘으로 인해 의도대로 동작하지 않고 예외가 전파되거나 롤백되는 문제를 지적하였습니다. 또한, userIdnull로 넘어올 경우 userRepository.findById(null) 호출로 인해 IllegalArgumentException이 발생할 수 있는 위험에 대해 방어적 코드 작성을 제안하였습니다.

Comment thread src/main/java/com/semosan/api/domain/semofeed/service/SemoFeedEmojiService.java Outdated
@pooreumjung
pooreumjung force-pushed the feat/#139-semofeed-emoji-reactions branch from 7a3f806 to 70a1769 Compare May 28, 2026 04:52
@pooreumjung
pooreumjung merged commit 5e9b9dc into develop May 28, 2026
1 check passed
@howooyeon
howooyeon deleted the feat/#139-semofeed-emoji-reactions branch June 3, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feat] 세모피드 조회 응답값 추가 및 세모피드 이모지 추가 및 감소 기능 추가

1 participant